import Layout from '@/views/layout'
/**
 * 财务模块
 * @module withdraw 提现资金管理
 *    @submodule withdrawDetail 账户资金明细
 * @module preDeposits 预存款资金管理
 * @module dailyBill 新结算日账单
 *    @submodule oldDailyBill 老结算日账单
 * @module dailyBillDetail 结算日账单明细
 *    @submodule oldBillDetailList 老结算日账单明细
 * @module monthlyBill 通道费月账单
 * @module channelInvoice 通道费发票
 * @module oilsInvoice 油品发票
 * 
 */
const withdraw = () => import('@/views/finance/withdraw')
const withdrawDetail = () => import('@/views/finance/withdrawDetail')
const preDeposits = () => import('@/views/finance/preDeposits')
const dailyBill = () => import('@/views/finance/dailyBill')
const dailyBillDetail = () => import('@/views/finance/dailyBillDetail')
const posDailyBillDetail = () => import('@/views/finance/posDailyBillDetail')
const oldDailyBill = () => import('@/views/finance/components/bill/oldDailyBill')
const oldBillDetailList = () => import('@/views/finance/components/bill/oldDetailList')
const monthlyBill = () => import('@/views/finance/monthlyBill')
const oilsInvoice = () => import('@/views/finance/oilsInvoice')
const channelInvoice = () => import('@/views/finance/channelInvoice')
const channelInvoiceConfig = () => import('@/views/finance/components/channelInvoice/invoiceConfig')


export default [
  {
    path: '/finance',
    name: 'finance',
    component: Layout,
    meta: {
      title: '资金管理',
      icon: 'finance.png',
      index: 3
    },
    children: [
      {
        path: 'withdraw',
        name: 'withdraw',
        component: withdraw,
        // componentName: 'finance_withdraw',
        meta: { title: '提现资金管理'},
      },
      {
        path: 'withdrawDetail',
        name: 'withdrawDetail',
        component: withdrawDetail,
        componentName: 'finance_withdrawDetail',
        meta: { title: '资金流水' }
      },
      {
        path: 'preDeposits',
        name: 'preDeposits',
        component: preDeposits,
        componentName: 'finance_preDeposits',
        meta: { title: '预存款资金管理' }
      }
    ]
  },
  {
    path: '/invoice',
    name: 'invoice',
    redirect: '/invoice/oilsInvoice',
    component: Layout,
    meta: {
      title: '发票管理',
      icon: 'invoice.png',
      index: 4
    },
    children: [
      {
        path: 'oilsInvoice',
        name: 'oilsInvoice',
        component: oilsInvoice,
        componentName: 'invoice_oilsInvoice',
        meta: { title: '油品发票管理' }
      },
      {
        path: 'channelInvoice',
        name: 'channelInvoice',
        component: channelInvoice,
        componentName: 'invoice_channelInvoice',
        meta: { title: '通道费发票管理' }
      },
      {
        path: 'invoiceConfig',
        name: 'invoiceConfig',
        component: channelInvoiceConfig,
        // componentName: 'invoice_invoiceConfig',
        hidden: true,
        meta: { title: '通道费开票信息配置' }
      },
      {
        path: 'userApplyInvoice',
        name: 'userApplyInvoice',
        meta: {
          title: '用户申请开票管理'
        },
        component: () => import('@/views/finance/userApplyInvoice')
      }
    ]
  },
  {
    path: '/bill',
    name: 'bill',
    redirect: '/bill/dailyBill',
    component: Layout,
    meta: {
      title: '结算中心',
      icon: 'bill.png',
      index: 5
    },
    children: [
      {
        path: 'dailyBill',
        name: 'dailyBill',
        component: dailyBill,
        componentName: 'bill_dailyBill',
        meta: { title: '结算日账单' }
      },
      {
        path: 'dailyBillDetail',
        name: 'dailyBillDetail',
        component: dailyBillDetail,
        componentName: 'bill_dailyBillDetail',
        meta: { title: '结算账单明细（团油）' }
      },
      {
        path: 'posDailyBillDetail',
        name: 'posDailyBillDetail',
        component: posDailyBillDetail,
        componentName: 'posBill_dailyBillDetail',
        meta: { title: '结算账单明细（POS）' }
      },
      {
        path: 'monthlyBill',
        name: 'monthlyBill',
        component: monthlyBill,
        componentName: 'bill_monthlyBill',
        meta: { title: '通道费月账单' }
      },
      {
        path: 'oldDailyBill',
        name: 'oldDailyBill',
        component: oldDailyBill,
        hidden: true,
        meta: { title: '老结算日账单' }
      },
      {
        path: 'oldBillDetailList',
        name: 'oldBillDetailList',
        component: oldBillDetailList,
        hidden: true,
        meta: { title: '老结算账单明细' }
      }
    ]
  }  
]